package com.lines.chap04;

/**
 * <p>
 * <code>ArrayStack</code>
 * </p>
 *
 * @author junbao3
 * TODO
 * @date 2023-04-03 14:26
 * Copyright (C) 2021 IFlyTek. All rights reserved.
 */
public class ArrayStack<Item> implements MyStack<Item> {
    private Item[] a = (Item[]) new Object[1];
    private int n = 0;
    @Override
    public MyStack<Item> push(Item item) {
        return null;
    }

    private void resize(int size){
        Item[] temp = (Item[]) new Object[size];
        for (int i = 0; i < n; i++) {
            temp[i] = a[i];
        }
        a = temp;

    }

    @Override
    public Item pop() {
        return null;
    }

    @Override
    public int size() {
        return 0;
    }

    @Override
    public boolean isEmpty() {
        return false;
    }
}
